import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入iconfont图标
import './assets/fonts/iconfont.css'
import './assets/css/reset.css'
import store from './store'
// 自定义插件
import loading from './plugins/loading/index'
// 引入axios
// import axios from 'axios'
// 引入vant部分组件 局部引入，用对象
import { Button, Icon, Tabbar, TabbarItem, Swipe, SwipeItem, Grid, GridItem, PullRefresh, List, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Card, Stepper, Form, Field, Checkbox, SwipeCell, SubmitBar, AddressEdit, AddressList, ContactCard, Search, Lazyload } from 'vant'
// import 必须是同步的，写在顶部
// import img from './assets/123.gif'
// 可以链式操作，在第一个引入的后面.use()
Vue.use(loading)
Vue.use(Button)
  .use(Icon)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(PullRefresh)
  .use(List)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Form)
  .use(Field)
  .use(Checkbox)
  .use(SwipeCell)
  .use(SubmitBar)
  .use(AddressEdit)
  .use(AddressList)
  .use(ContactCard)
  .use(Search)
  .use(Lazyload, {
    // loading: img,
    // require 是按需引入
    loading: require('./assets/123.gif'),
    error: '',
    preload: '1'
  })

// 定义第三方的方法建议加个$
// Vue.prototype.$http = axios
Vue.config.productionTip = false

// 在实例上挂载，这就是vue实例
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
